package Object;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.ArrayList;

public class ObjectStreamDemo4 {
    public static void main(String [] args) throws IOException, ClassNotFoundException {
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream(("code.txt")));
        ArrayList<Student02> list  = (ArrayList<Student02>)ois.readObject();
        for(Student02 s : list) {
            System.out.println(s);
        }





        ois.close();
    }

}
